package cm.ncist;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;

public class Main {
    public static void main(String[] args) {
        //使用迭代器进行遍历
       Collection collection = new ArrayList();
       collection.add("Hello");
       collection.add("Java");
       collection.add("Python");
        Iterator iterator = collection.iterator();
        while(iterator.hasNext()){
            System.out.println(iterator.next());
        }
    }

}
